LanDiscovery

class LanDiscovery(site: Site, links: WebSocketLinks, wsPort: Int, beaconPort: Int = Beacons.PORT, group: String = Beacons.GROUP, interval: Long) : AutoCloseable

The sites of the local network found and linked to site (see Beacons): its beacons sent over UDP multicast, to group on beaconPort, every interval milliseconds, with the port of the WebSocket server of links, wsPort. The group is joined, and the beacons sent, on every interface able to (the loopback one as well, for the sites of the same machine), over IPv4 alone: a socket of both IPv4 and IPv6 may not reach an IPv4 group (on macOS).

Constructors

Link copied to clipboard
constructor(site: Site, links: WebSocketLinks, wsPort: Int, beaconPort: Int = Beacons.PORT, group: String = Beacons.GROUP, interval: Long)

Functions

Link copied to clipboard
open override fun close()

Stops announcing the site and finding the others: the links opened stay